package edu.byu.intex2.data.bo;

import edu.byu.intex2.data.DataException;
import edu.byu.intex2.data.dao.*;

/**
 * @author Jason Whiting
 */
public class Task extends BusinessObject
{

    private String description = null;

    /**
     * Creates a new instance of BusinessObject
     * @param id
     */
    public Task(String id)
    {
        super(id);
    }

    //Quick Access Method
    public void save() throws DataException
    {
        try
        {
            TaskDAO.getInstance().save(this);
        } catch (DataException e)
        {
            e.printStackTrace();
        }
    }

    /**
     * @return the description
     */
    public String getDescription()
    {
        return description;
    }

    /**
     * @param description the description to set
     */
    public void setDescription(String description)
    {
        this.description = description;
        this.setDirty();
    }

    @Override
    public String toString()
    {
        return description;
    }
}//class